<?php
	header("Content-Type: text/html;charset=utf-8");
	include ("function/_nosql.php");
	include ("function/function.php");
	$about_add = chkstr(trim($_REQUEST['about_add']));
	$lname = chkstr(trim($_REQUEST['lname']));
	$lnick = chkstr(trim($_REQUEST['lnick']));
	$lage = chkstr(trim($_REQUEST['lage']));
	$lsex = chkstr(trim($_REQUEST['lsex']));
	$ljigu = chkstr(trim($_REQUEST['ljigu']));
	$lxueli = chkstr(trim($_REQUEST['lxueli']));
	$lminzu = chkstr(trim($_REQUEST['lminzu']));
	$ljian = chkstr(trim($_REQUEST['ljian']));
	$lphon = chkstr(trim($_REQUEST['lphon']));
	$lgong = chkstr(trim($_REQUEST['lgong']));
	$lzhiyuan = chkstr(trim($_REQUEST['lzhiyuan']));
	$lfutime = implode(',', $_REQUEST['lfutime']);
	$shenfen = chkstr(trim($_REQUEST['shenfen']));
	$zcshi = date("Y-m-d H:i:s",time());
	$ty = chkstr(trim($_REQUEST['ty']));
	if($ty != 1)
	{
		echo erro("请阅读服务条款");
	}
	if($about_add == 'add')
	{
		if(empty($lname)){
			echo erro("姓名不能为空");
		}
		if(!is_numeric($lphon)){
			echo erro("手机号只能为数字");
		}
		// 添加数据
		$mysql = new sqlstr("kboy_lingdui"); 
		$mysql -> set("lname",$lname);
		
		$mysql -> set("lnick",$lnick);
		$mysql -> set("lage",$lage);
		$mysql -> set("lsex",$lsex);
		$mysql -> set("ljigu",$ljigu);
		$mysql -> set("lyouxiang",$lxueli);
		$mysql -> set("lminzu",$lminzu);
		
		$mysql -> set("ljian",$ljian);
		$mysql -> set("lphon",$lphon);
		$mysql -> set("lgong",$lgong);
		$mysql -> set("lzhiyuan",$lzhiyuan);
		$mysql -> set("lfutime",$lfutime);
		$mysql -> set("lshenfen",$shenfen);
		$mysql -> set("zcshi",$zcshi);
		$news_sql = $mysql -> insertSql();
		$news_res = mysql_query($news_sql);
		if($news_res){
			echo ok("操作成功","about.php?newsid=154");
		}else{
			echo erro("服务器内部错误");
		}
	}
